# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=syborg
pkgver=36.5cd010b
pkgrel=7
pkgdesc='Recursive DNS Subdomain Enumerator with dead-end avoidance system.'
groups=('blackarch' 'blackarch-recon')
arch=('any')
url='https://github.com/MilindPurswani/Syborg'
license=('custom:unknown')
depends=('python' 'python-dnspython' 'python-filequeue')
makedepends=('git')
source=("$pkgname::git+https://github.com/MilindPurswani/Syborg.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1i\#!/usr/bin/python3' "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" wordlist.txt
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
}

